package yns.springboot.guide.demo.exception;

import java.io.Serializable;

public class CommonExceptionInfo extends RuntimeException implements Serializable {

	private static final long serialVersionUID = 1504207086545949989L;

	private ExceptionCodeEnum errorCode;
	private String errorMsg;
	
	public CommonExceptionInfo(ExceptionCodeEnum errorCode, String errorMsg) {
		super();
		this.errorCode = errorCode;
		this.errorMsg = errorMsg;
	}

	
	public ExceptionCodeEnum getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(ExceptionCodeEnum errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}


	@Override
	public String toString() {
		return "CommonException [errorCode=" + errorCode + ", errorMsg=" + errorMsg + "]";
	}

	




}
